/*
 * @Author: jiangyg email@jiangyg.com
 * @Date: 2022-10-31 19:54:34
 * @LastEditors: jiangyg email@jiangyg.com
 * @LastEditTime: 2022-11-01 07:19:34
 * @FilePath: /frontend/mall-frontend/src/mock/reg.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { MockMethod } from 'vite-plugin-mock';

export default [

    // 验证手机号是否已注册
    {
        url: '/auth/mobile-registered',
        method: 'post',
        response: () => {
            return {
                "code": "200", "msg": "请求成功！", "body|1": ['Y', 'N']
            };
        }
    },
    
    // 发送手机验证码
    {
        url: '/auth/send-mcaptcha',
        method: 'post',
        response: () => {
            return {
                "code": "200", "msg": "验证码发送成功！", "body": null
            };
        }
    },

    // 校验手机验证码
    {
        url: '/auth/verify-mcaptcha',
        method: 'post',
        response: () => {
            return {
                "code": "200", "msg": "请求成功！", "body|1": ['0', '1', '2']
            };
        }
    },

    // 注册
    {
        url: '/auth/register',
        method: 'post',
        response: () => {
            return {
                "code": "200", "msg": "请求成功！", "body": null
            };
        }
    }

] as MockMethod[];